<html>
<head><meta charset="utf-8"><title>Getting active features in rustdoc::render · rustdoc · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/index.html">rustdoc</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html">Getting active features in rustdoc::render</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="218140163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140163">(Nov 28 2020 at 01:12)</a>:</h4>
<p>Currently working on <a href="https://github.com/rust-lang/rust/pull/79454">https://github.com/rust-lang/rust/pull/79454</a>. I need to gate the new parsing to the feature but I don't know how to check if a feature is currently active when the code asking for the check is in <code>librustdoc</code>, not directly in the compiler</p>



<a name="218140221"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140221" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140221">(Nov 28 2020 at 01:14)</a>:</h4>
<p>I have found <a href="https://rustc-dev-guide.rust-lang.org/implementing_new_features.html">https://rustc-dev-guide.rust-lang.org/implementing_new_features.html</a> and <a href="https://rustc-dev-guide.rust-lang.org/feature-gates.html#adding-a-feature-gate">https://rustc-dev-guide.rust-lang.org/feature-gates.html#adding-a-feature-gate</a> in the dev guide but they seem to need either a <code>tcx</code> or <code>sess</code> which I don't know how to get when in <code>librustdoc</code></p>



<a name="218140285"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140285" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140285">(Nov 28 2020 at 01:16)</a>:</h4>
<p><span class="user-mention" data-user-id="307289">@Poliorcetics</span> <code>cx.tcx</code></p>



<a name="218140288"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140288" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140288">(Nov 28 2020 at 01:16)</a>:</h4>
<p>is this in render? render doesn't have a tcx available unfortunately</p>



<a name="218140302"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140302" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140302">(Nov 28 2020 at 01:17)</a>:</h4>
<p>this is in <code>html/markdown.rs</code></p>



<a name="218140306"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140306" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140306">(Nov 28 2020 at 01:17)</a>:</h4>
<p>In an iterator impl</p>



<a name="218140308"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140308" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140308">(Nov 28 2020 at 01:17)</a>:</h4>
<p>so yeah unfortunately there's no tcx there</p>



<a name="218140351"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140351" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140351">(Nov 28 2020 at 01:18)</a>:</h4>
<p>I need to get around to adding it - it should be fairly simple, just lift the call to <code>enter_compiler</code> up to <code>main</code> instead of putting it in <code>core</code></p>



<a name="218140358"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140358" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140358">(Nov 28 2020 at 01:18)</a>:</h4>
<p>in the meantime, you can store the info you need in DocContext</p>



<a name="218140380"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140380" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140380">(Nov 28 2020 at 01:19)</a>:</h4>
<p>err no sorry, DocContext goes away by the time you get to render</p>



<a name="218140381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140381">(Nov 28 2020 at 01:19)</a>:</h4>
<p>hmmm</p>



<a name="218140432"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140432" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140432">(Nov 28 2020 at 01:20)</a>:</h4>
<p>renderInfo maybe? <a href="https://github.com/rust-lang/rust/blob/master/src/librustdoc/lib.rs#L481">https://github.com/rust-lang/rust/blob/master/src/librustdoc/lib.rs#L481</a></p>



<a name="218140434"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140434" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140434">(Nov 28 2020 at 01:20)</a>:</h4>
<p>or renderOptions? I don't know the difference</p>



<a name="218140436"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140436" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140436">(Nov 28 2020 at 01:20)</a>:</h4>
<p><span class="user-mention" data-user-id="210316">@GuillaumeGomez</span> do you?</p>



<a name="218140447"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140447" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140447">(Nov 28 2020 at 01:21)</a>:</h4>
<p>Oh wait I'm having another problem before that:</p>
<p>I declared the new feature as explained in the dev guide in <code>active.rs</code>:</p>
<div class="codehilite"><pre><span></span><code>    /// Allows users to provide classes for fenced code block using `class:classname`.
    (active, user_classes_in_docs, &quot;1.50.0&quot;, Some(79483), None),
</code></pre></div>
<p>But now I get this error:</p>
<div class="codehilite"><pre><span></span><code>   Compiling rustc_feature v0.0.0 (/Users/alexis/Projects/rust/rust/compiler/rustc_feature)
error[E0425]: cannot find value `user_classes_in_docs` in module `sym`
   --&gt; compiler/rustc_feature/src/active.rs:624:14
    |
624 |     (active, user_classes_in_docs, &quot;1.50.0&quot;, Some(79483), None),
    |              ^^^^^^^^^^^^^^^^^^^^ not found in `sym`

error[E0531]: cannot find unit struct, unit variant or constant `user_classes_in_docs` in module `sym`
   --&gt; compiler/rustc_feature/src/active.rs:624:14
    |
624 |     (active, user_classes_in_docs, &quot;1.50.0&quot;, Some(79483), None),
    |              ^^^^^^^^^^^^^^^^^^^^ not found in `sym`
</code></pre></div>



<a name="218140487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140487">(Nov 28 2020 at 01:22)</a>:</h4>
<p>I looked at the <code>sym</code> module and I can't understand it at all</p>



<a name="218140498"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140498" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140498">(Nov 28 2020 at 01:23)</a>:</h4>
<p>And the <a href="https://github.com/rust-lang/rust/pull/75740">PR</a> I also use as a guide did not touch it so I'm not sure how to do it</p>



<a name="218140504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140504">(Nov 28 2020 at 01:23)</a>:</h4>
<p>you need to add it here: <a href="https://github.com/rust-lang/rust/blob/master/compiler/rustc_span/src/symbol.rs#L105">https://github.com/rust-lang/rust/blob/master/compiler/rustc_span/src/symbol.rs#L105</a></p>



<a name="218140505"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140505" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140505">(Nov 28 2020 at 01:23)</a>:</h4>
<p><code>sym</code> is for interned strings</p>



<a name="218140513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140513">(Nov 28 2020 at 01:23)</a>:</h4>
<p>ohhhh, thanks !</p>



<a name="218140514"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140514" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140514">(Nov 28 2020 at 01:24)</a>:</h4>
<p>specifically, strings that are interned at compile time and can be used statically without having to intern it again</p>



<a name="218140631"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140631" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140631">(Nov 28 2020 at 01:26)</a>:</h4>
<p>argh, recompiling half the world now</p>



<a name="218140632"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140632" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140632">(Nov 28 2020 at 01:26)</a>:</h4>
<p>Well, at least it seems to compile <span aria-label="grinning" class="emoji emoji-1f600" role="img" title="grinning">:grinning:</span></p>



<a name="218140700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140700">(Nov 28 2020 at 01:29)</a>:</h4>
<p>Barring compilation times, I'm always surprised by how nice it is to contribute to rust-lang/rust</p>



<a name="218140842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140842">(Nov 28 2020 at 01:32)</a>:</h4>
<p><code>error: ui test compiled successfully!</code> <span aria-label="laughter tears" class="emoji emoji-1f602" role="img" title="laughter tears">:laughter_tears:</span></p>



<a name="218140848"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140848" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140848">(Nov 28 2020 at 01:33)</a>:</h4>
<p>you need <code>// check-pass</code> at the top</p>



<a name="218140869"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140869" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140869">(Nov 28 2020 at 01:33)</a>:</h4>
<p>This is intended to fail, this is the test for the missing feature gate ^^</p>



<a name="218140914"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140914" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140914">(Nov 28 2020 at 01:34)</a>:</h4>
<p>So now I'm back to the original problem, how to know if the feature is active or not</p>



<a name="218140927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140927">(Nov 28 2020 at 01:35)</a>:</h4>
<p>I'm modifying the <code>LangString::parse</code> method</p>



<a name="218140947"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140947" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140947">(Nov 28 2020 at 01:35)</a>:</h4>
<p>I would guess you need to thread the info through RenderInfo somehow</p>



<a name="218140953"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218140953" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218140953">(Nov 28 2020 at 01:36)</a>:</h4>
<p>but I don't know much about this part of rustdoc</p>



<a name="218186130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218186130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218186130">(Nov 28 2020 at 23:28)</a>:</h4>
<p>I could add a new lint to <code>passes/doc_test_lints.rs</code> ? Elsewhere, even if I detect an incorrect use, I cannot report it properly</p>



<a name="218186512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218186512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218186512">(Nov 28 2020 at 23:40)</a>:</h4>
<p>oh I see</p>



<a name="218186514"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218186514" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218186514">(Nov 28 2020 at 23:40)</a>:</h4>
<p>yeah that's unfortunate</p>



<a name="218186533"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218186533" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218186533">(Nov 28 2020 at 23:41)</a>:</h4>
<p>checking it ahead of time seems reasonable</p>



<a name="218186534"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218186534" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218186534">(Nov 28 2020 at 23:42)</a>:</h4>
<p>although this is enough of a hack I'm wondering if we should just pass in a tcx to render after all</p>



<a name="218186571"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218186571" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218186571">(Nov 28 2020 at 23:42)</a>:</h4>
<p>it's not that much less work at this point</p>



<a name="218186844"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218186844" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218186844">(Nov 28 2020 at 23:50)</a>:</h4>
<p>It's even more of a hack no ? Errors related to parsing probably should appear from render ?</p>



<a name="218186852"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218186852" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218186852">(Nov 28 2020 at 23:50)</a>:</h4>
<p>I'm going to try the lint route</p>



<a name="218186863"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218186863" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218186863">(Nov 28 2020 at 23:51)</a>:</h4>
<p>well there shouldn't <em>be</em> a difference between render and clean</p>



<a name="218186864"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218186864" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218186864">(Nov 28 2020 at 23:51)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/76382">https://github.com/rust-lang/rust/issues/76382</a></p>



<a name="218189697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218189697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218189697">(Nov 29 2020 at 01:18)</a>:</h4>
<div class="codehilite"><pre><span></span><code>error[E0658]: Found in 2 block(s): class:test:name, class:test2, class:test3
 --&gt; src/main.rs:1:1
  |
1 | / /// Some code block with `rust,class:test:name` as the language string
2 | | ///
3 | | /// ```rust,class:test:name
4 | | /// int main(void) { return 0; }
... |
8 | | /// int main(void) { return 0; }
9 | | /// ```
  | |_______^
  |
  = note: see issue #79483 &lt;https://github.com/rust-lang/rust/issues/79483&gt; for more information
  = help: add `#![feature(custom_code_classes_in_docs)]` to the crate attributes to enable

error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.
error: could not document `playground`

Caused by:
  process didn&#39;t exit successfully: `rustdoc --edition=2018 --crate-type bin --crate-name playground src/main.rs -o /Users/alexis/Projects/rust/playground/target/doc --error-format=json --json=diagnostic-rendered-ansi --document-private-items -L dependency=/Users/alexis/Projects/rust/playground/target/debug/deps --crate-version 0.1.0` (exit code: 1)
</code></pre></div>



<a name="218189699"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218189699" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218189699">(Nov 29 2020 at 01:19)</a>:</h4>
<p>It works !</p>



<a name="218189704"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218189704" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218189704">(Nov 29 2020 at 01:19)</a>:</h4>
<p>Successfully fails to compile*</p>



<a name="218189758"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218189758" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218189758">(Nov 29 2020 at 01:20)</a>:</h4>
<p>And doesn't warn with the <code>#![feature(custom_code_classes_in_docs)]</code> present</p>



<a name="218189759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218189759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218189759">(Nov 29 2020 at 01:20)</a>:</h4>
<p>nice</p>



<a name="218189767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218189767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218189767">(Nov 29 2020 at 01:20)</a>:</h4>
<p>nice :D</p>



<a name="218189891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218189891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218189891">(Nov 29 2020 at 01:24)</a>:</h4>
<p>Is there a way to warn about individual doc examples ?</p>



<a name="218189894"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218189894" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218189894">(Nov 29 2020 at 01:24)</a>:</h4>
<p>Since here I am warning about something outside of the example but relevant to only it, not the whole doc-comment</p>



<a name="218189895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218189895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218189895">(Nov 29 2020 at 01:24)</a>:</h4>
<p>like within a doc-comment? not that I know of, <span class="user-mention" data-user-id="210316">@GuillaumeGomez</span> might know</p>



<a name="218189906"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218189906" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218189906">(Nov 29 2020 at 01:25)</a>:</h4>
<p>If it's not possible the current solution is probably the best I can do</p>



<a name="218189910"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218189910" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218189910">(Nov 29 2020 at 01:25)</a>:</h4>
<p>I.E listing the <code>class:...</code> items and saying they should be in this comment</p>



<a name="218190178"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190178" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190178">(Nov 29 2020 at 01:34)</a>:</h4>
<p>I'm having trouble with the feature gate test</p>



<a name="218190184"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190184" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190184">(Nov 29 2020 at 01:34)</a>:</h4>
<p>what sort of trouble?</p>



<a name="218190187"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190187" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190187">(Nov 29 2020 at 01:34)</a>:</h4>
<p>I cannot place it in <code>src/test/ui</code> since it compiles correctly but does not run rustdoc</p>



<a name="218190190"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190190" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190190">(Nov 29 2020 at 01:34)</a>:</h4>
<p>put it in <code>src/test/rustdoc-ui</code> instead</p>



<a name="218190193"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190193" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190193">(Nov 29 2020 at 01:35)</a>:</h4>
<p>And in <code>src/test/rustdoc-ui</code> it complains about missing the test for it in <code>src/test/ui</code></p>



<a name="218190198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190198">(Nov 29 2020 at 01:35)</a>:</h4>
<p>oh that seems like a bug in tidy</p>



<a name="218190201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190201">(Nov 29 2020 at 01:35)</a>:</h4>
<p>what's the complaint it gives?</p>



<a name="218190203"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190203" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190203">(Nov 29 2020 at 01:35)</a>:</h4>
<div class="codehilite"><pre><span></span><code>Expected a gate test for the feature &#39;custom_code_classes_in_docs&#39;.
Hint: create a failing test file named &#39;feature-gate-custom_code_classes_in_docs.rs&#39;
      in the &#39;ui&#39; test suite, with its failures due to
      missing usage of `#![feature(custom_code_classes_in_docs)]`.
Hint: If you already have such a test and don&#39;t want to rename it,
      you can also add a // gate-test-custom_code_classes_in_docs line to the test file.
tidy error: Found 1 features without a gate test.
some tidy checks failed


command did not execute successfully: &quot;/Users/alexis/Projects/rust/rust/build/x86_64-apple-darwin/stage0-tools-bin/tidy&quot; &quot;/Users/alexis/Projects/rust/rust&quot; &quot;/Users/alexis/Projects/rust/rust/build/x86_64-apple-darwin/stage0/bin/cargo&quot; &quot;/Users/alexis/Projects/rust/rust/build&quot;
expected success, got: exit code: 1


failed to run: /Users/alexis/Projects/rust/rust/build/bootstrap/debug/bootstrap test --stage 1 --test-args feature-gate-custom_code_c
Build completed unsuccessfully in 0:00:08
</code></pre></div>



<a name="218190246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190246">(Nov 29 2020 at 01:36)</a>:</h4>
<p>My test file is <code>src/test/rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs</code></p>



<a name="218190248"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190248" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190248">(Nov 29 2020 at 01:36)</a>:</h4>
<p>did you try <code>// gate-test-custom_code_classes_in_docs</code> in rustdoc-ui?</p>



<a name="218190255"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190255" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190255">(Nov 29 2020 at 01:36)</a>:</h4>
<p>No yet, I didn't think it was necessary</p>



<a name="218190258"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190258" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190258">(Nov 29 2020 at 01:36)</a>:</h4>
<p>I'll try that</p>



<a name="218190262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190262">(Nov 29 2020 at 01:36)</a>:</h4>
<p>if that doesn't work, tidy probably needs to be changed to look in more directories</p>



<a name="218190318"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190318" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190318">(Nov 29 2020 at 01:38)</a>:</h4>
<p>Nop, doesn't work</p>



<a name="218190324"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190324" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190324">(Nov 29 2020 at 01:39)</a>:</h4>
<p>ok, then you'll need to fix tidy unfortunately</p>



<a name="218190326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190326">(Nov 29 2020 at 01:39)</a>:</h4>
<p>it's somewhere in <code>src/tools</code> IIRC</p>



<a name="218190328"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190328" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190328">(Nov 29 2020 at 01:40)</a>:</h4>
<p>look for <code>"src/test/ui"</code></p>



<a name="218190373"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190373" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190373">(Nov 29 2020 at 01:41)</a>:</h4>
<p>actually maybe ask in <a class="stream" data-stream-id="182449" href="/#narrow/stream/182449-t-compiler.2Fhelp">#t-compiler/help</a></p>



<a name="218190431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190431">(Nov 29 2020 at 01:43)</a>:</h4>
<p>Found it <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<a name="218190497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190497">(Nov 29 2020 at 01:45)</a>:</h4>
<p>Hum, looks like I worsened my situation, now I don't get an error at all despite the missing <code>.stderr</code> file</p>



<a name="218190501"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190501" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190501">(Nov 29 2020 at 01:45)</a>:</h4>
<p><code>tidy</code> is probably not running <code>rustdoc</code> on the file</p>



<a name="218190505"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190505" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190505">(Nov 29 2020 at 01:45)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> do you have suggestions for how to add a feature gate that only appears for rustdoc?</p>



<a name="218190509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190509">(Nov 29 2020 at 01:45)</a>:</h4>
<p>we can't put the test in <code>src/test/ui</code> because it doesn't fail there</p>



<a name="218190513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190513">(Nov 29 2020 at 01:45)</a>:</h4>
<p>and <code>src/test/rustdoc-ui</code> appears to be ignored</p>



<a name="218190553"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190553" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190553">(Nov 29 2020 at 01:46)</a>:</h4>
<p>And for code in <code>/// comments</code>, not code considered by rustc</p>



<a name="218190554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190554">(Nov 29 2020 at 01:46)</a>:</h4>
<p>I doubt you want to force people to write e.g. <code>#![cfg_attr(...)]</code> for it -- is there a reason it needs to be only a rustdoc feature?</p>



<a name="218190559"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190559" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190559">(Nov 29 2020 at 01:46)</a>:</h4>
<p>because it doesn't exist otherwise</p>



<a name="218190563"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190563" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190563">(Nov 29 2020 at 01:46)</a>:</h4>
<p>it's for how language strings are parsed in markdown comments</p>



<a name="218190564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190564">(Nov 29 2020 at 01:46)</a>:</h4>
<p>and rustc completely ignores comments</p>



<a name="218190569"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190569" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190569">(Nov 29 2020 at 01:47)</a>:</h4>
<div class="codehilite"><pre><span></span><code>/// Some code block with `rust,class:test:name` as the language string
///
/// ```rust,class:test:name
/// int main(void) {
///     return 0;
/// }
/// ```
fn main() {}
</code></pre></div>
<p>The idea is to gate the <code>class:test:name</code> above to nightly</p>



<a name="218190570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190570">(Nov 29 2020 at 01:47)</a>:</h4>
<p>I'm not sure what <code>cfg_attr</code> has to do with it</p>



<a name="218190619"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190619" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190619">(Nov 29 2020 at 01:48)</a>:</h4>
<p>So far I have a working error message but cannot ensure it works with tidy, i'm supposing it doesn't run rustdoc on feature gates files (logical given this is not important for 433 out of 434 features)</p>



<a name="218190626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190626">(Nov 29 2020 at 01:49)</a>:</h4>
<p>I just mean that there should be no reason the feature gate can't just be defined for all things</p>



<a name="218190632"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190632" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190632">(Nov 29 2020 at 01:49)</a>:</h4>
<p>rustc can do nothing for it, but that should be fine</p>



<a name="218190634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190634">(Nov 29 2020 at 01:49)</a>:</h4>
<p>rustdoc will do something...</p>



<a name="218190635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190635">(Nov 29 2020 at 01:49)</a>:</h4>
<p>well sure, but it seems silly to add a test that does nothing</p>



<a name="218190637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190637">(Nov 29 2020 at 01:49)</a>:</h4>
<p>rustdoc never gets run on <code>src/test/ui</code></p>



<a name="218190638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190638">(Nov 29 2020 at 01:49)</a>:</h4>
<p>so it won't fail to compile</p>



<a name="218190639"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190639" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190639">(Nov 29 2020 at 01:50)</a>:</h4>
<p>why do you need to add a test?</p>



<a name="218190683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190683">(Nov 29 2020 at 01:50)</a>:</h4>
<p>because tidy enforces it <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="218190688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190688">(Nov 29 2020 at 01:50)</a>:</h4>
<p>To ensure it's only usable on nightly too ^^</p>



<a name="218190689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190689">(Nov 29 2020 at 01:50)</a>:</h4>
<p>just... edit tidy?</p>



<a name="218190692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190692">(Nov 29 2020 at 01:50)</a>:</h4>
<p>I'm doing this</p>



<a name="218190704"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190704" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190704">(Nov 29 2020 at 01:51)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116122">simulacrum</span> <a href="#narrow/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender/near/218190689">said</a>:</p>
<blockquote>
<p>just... edit tidy?</p>
</blockquote>
<p>well, is it ok to say 'you no longer need a test for all features'?</p>



<a name="218190706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190706">(Nov 29 2020 at 01:51)</a>:</h4>
<p>Is running <code>rustdoc</code> on tests in <code>rustdoc-ui</code> only ok ? That way the other 433 features shouldn't pay the cost</p>



<a name="218190708"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190708" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190708">(Nov 29 2020 at 01:51)</a>:</h4>
<p>And all features would still be tested</p>



<a name="218190710"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190710" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190710">(Nov 29 2020 at 01:51)</a>:</h4>
<p>I personally am not too worried by <em>having</em> a test that tidy can't currently see</p>



<a name="218190712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190712">(Nov 29 2020 at 01:51)</a>:</h4>
<p>It's a lint tool, sometimes it is wrong</p>



<a name="218190719"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190719" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190719">(Nov 29 2020 at 01:51)</a>:</h4>
<p>If you want to adjust tidy to support gate tests in rustdoc-ui that seems fine too.</p>



<a name="218190756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190756">(Nov 29 2020 at 01:52)</a>:</h4>
<p>Will do that then !</p>



<a name="218190771"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190771" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190771">(Nov 29 2020 at 01:53)</a>:</h4>
<p>Oh wait ! Tidy doesn't catch it but running the whole test suite does</p>



<a name="218190776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190776">(Nov 29 2020 at 01:53)</a>:</h4>
<p>Because rustdoc is run on files in <code>rustdoc-ui</code> later in the process</p>



<a name="218190780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190780">(Nov 29 2020 at 01:53)</a>:</h4>
<p>So a one-line modif to <code>tidy</code> and running the whole test suite makes it work</p>



<a name="218190818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218190818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218190818">(Nov 29 2020 at 01:54)</a>:</h4>
<p>I'll explain that in a comment on the tidy modif else I'll forget it</p>



<a name="218191256"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218191256" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218191256">(Nov 29 2020 at 02:07)</a>:</h4>
<p>Well, now I have another problem: </p>
<div class="codehilite"><pre><span></span><code>---- [ui] rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs stdout ----

error: /Users/alexis/Projects/rust/rust/src/test/rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs:1: unexpected error: &#39;1:1: 3:8: Found in 1 block(s): class:language-c [E0658]&#39;

error: 1 unexpected errors found, 0 expected errors not found
status: exit code: 1
command: &quot;/Users/alexis/Projects/rust/rust/build/x86_64-apple-darwin/stage1/bin/rustdoc&quot; &quot;/Users/alexis/Projects/rust/rust/src/test/rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs&quot; &quot;-Zthreads=1&quot; &quot;--target=x86_64-apple-darwin&quot; &quot;--error-format&quot; &quot;json&quot; &quot;-Zui-testing&quot; &quot;-Zdeduplicate-diagnostics=no&quot; &quot;-Zemit-future-incompat-report&quot; &quot;-o&quot; &quot;/Users/alexis/Projects/rust/rust/build/x86_64-apple-darwin/test/rustdoc-ui/feature-gate-custom_code_classes_in_docs&quot; &quot;-Cdebuginfo=0&quot; &quot;-Zunstable-options&quot; &quot;-Lnative=/Users/alexis/Projects/rust/rust/build/x86_64-apple-darwin/native/rust-test-helpers&quot; &quot;-L&quot; &quot;/Users/alexis/Projects/rust/rust/build/x86_64-apple-darwin/test/rustdoc-ui/feature-gate-custom_code_classes_in_docs/auxiliary&quot;
unexpected errors (from JSON output): [
    Error {
        line_num: 1,
        kind: Some(
            Error,
        ),
        msg: &quot;1:1: 3:8: Found in 1 block(s): class:language-c [E0658]&quot;,
    },
]

thread &#39;[ui] rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs&#39; panicked at &#39;explicit panic&#39;, src/tools/compiletest/src/runtest.rs:1493:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
</code></pre></div>



<a name="218191258"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218191258" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218191258">(Nov 29 2020 at 02:07)</a>:</h4>
<p>This is caused by the JSON format output</p>



<a name="218191261"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218191261" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218191261">(Nov 29 2020 at 02:07)</a>:</h4>
<p>you need to add an error annotation</p>



<a name="218191263"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218191263" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218191263">(Nov 29 2020 at 02:07)</a>:</h4>
<p><a href="https://rustc-dev-guide.rust-lang.org/tests/adding.html#ui">https://rustc-dev-guide.rust-lang.org/tests/adding.html#ui</a></p>



<a name="218192081"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218192081" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218192081">(Nov 29 2020 at 02:33)</a>:</h4>
<p>Well, 3h33AM is a good hour to go to sleep now that is works</p>



<a name="218192088"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Getting%20active%20features%20in%20rustdoc%3A%3Arender/near/218192088" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Getting.20active.20features.20in.20rustdoc.3A.3Arender.html#218192088">(Nov 29 2020 at 02:33)</a>:</h4>
<p>Pushed my changes, let's hope CI will confirm I didn't miss anything</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>